{% extends "common/layout_main.html" %}
{% block content %}
    <div class="row  border-bottom">
        <div class="col-lg-12">
           {% include 'common/tab_stat.html' %}
        </div>
    </div>
    <div class="row m-t">
        <div class="col-lg-12" id="container" style="height: 400px;" data-highcharts-chart="0">
            图标使用Highchart
        </div>
        <div class="col-lg-12 m-t">
            <form class="form-inline" id="search_form_wrap" autocomplete="off">
                <div class="row p-w-m">
                    <div class="form-group">
                        <div class="input-group">
                            <input type="text" placeholder="请选择开始时间" name="date_from" class="form-control"
                                   value="{{ search.date_from }}">
                        </div>
                    </div>
                    <div class="form-group m-r m-l">
                        <label>至</label>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <input type="text" placeholder="请选择结束时间" name="date_to" class="form-control"
                                   value="{{ search.date_to }}">
                        </div>
                    </div>
                    <div class="form-group">
                        <a class="btn btn-w-m btn-outline btn-primary search">搜索</a>
                    </div>
                </div>
                <hr>
            </form>
            <table class="table table-bordered m-t">
                <thead>
                <tr>
                    <th>日期</th>
                    <th>分享次数</th>
                </tr>
                </thead>
                <tbody>
                {% if pagination.items %}
                    {% for item in pagination.items %}
                        <tr>
                            <td>{{ item.date }}</td>
                            <td>{{ item.total_shared_count }}</td>
                        </tr>
                    {% endfor %}
                {% else %}
                    <tr>
                        <td colspan="2">暂无数据</td>
                    </tr>
                {% endif %}
                </tbody>
            </table>
            {% include 'common/pagenation.html' %}
        </div>
    </div>
{% endblock %}

{% block css %}
    <link rel="stylesheet" href="{{ buildStaticUrl('/plugins/datetimepicker/jquery.datetimepicker.min.css') }}">
{% endblock %}

{% block js %}
    <script src="{{ buildStaticUrl('/plugins/highcharts/highcharts.js') }}"></script>
    <script src="{{ buildStaticUrl('/plugins/datetimepicker/jquery.datetimepicker.full.min.js') }}"></script>
    <script src="{{ buildStaticUrl('/js/chart.js') }}"></script>
    <script src="{{ buildStaticUrl('/js/statistics/share.js') }}"></script>
{% endblock %}